<?php

class Param {
    
    public $PROTO_VERSION = "1.00";
    
    public $PROTO_RESULT = 0;
    
    //public $PROTO_REQUEST_TOKEN = "";
    
    public $PROTO_SESSION_ID = "0";
    
    public $PROTO_UPDATE_URL = "";
    
    function __construct() {
        
        if ( func_num_args() > 0 ) {
            $arg = func_get_arg( 0 );
            $this->PROTO_VERSION = $arg->PROTO_VERSION;
            $this->PROTO_RESULT = $arg->PROTO_RESULT;
            $this->PROTO_UPDATE_URL = $arg->PROTO_UPDATE_URL;
            $this->PROTO_SESSION_ID = $arg->PROTO_SESSION_ID;
        }
        else {
            $this->PROTO_RESULT = 0;
            /*
             if ( CEnv::is_oauth_3legged() ) {
             global $OAuth;
             if ( isset( $OAuth ) ) {
             $this->PROTO_SESSION_ID = (string)$OAuth->GetSessionId();
             }
             }
             else if ( CEnv::is_on_ChinaMobile() ) {
             global $OAuth;
             if ( isset( $OAuth ) ) {
             $this->PROTO_SESSION_ID = (string)$OAuth->GetSessionId();
             }
             }
             */
        }
    }
}